package com.message_listener;


import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

@Component
@RabbitListener(queues = {"sunjob_queue"})
public class RecvMessageService {

    @RabbitHandler
    public void recv(String msg) {
        System.out.println("收到的消息是:" + msg);
    }

}
